import request from '../utils/request';


/**
 * 获取所有新闻公告,包括条件查询接口
 * @param query
 * @returns {AxiosPromise}
 */
export const getNewsInfo = query =>{
    return request({
        url:'/common/news/getNewsInfo',
        method:'get',
        params:query
    })
};
/**
 * 保存新闻公告接口
 * @param data
 * @returns {AxiosPromise}
 */
export const saveNewsInfo = data =>{
    return request({
        url:'/common/news/saveNewsInfo',
        method:'post',
        data
    })
};
/**
 * 更新新闻公告接口
 * @param data
 * @returns {AxiosPromise}
 */
export const updateNewsInfo = data =>{
    return request({
        url:'/common/news/updateNewsInfo',
        method:'put',
        data
    })
};
/**
 *根据id删除新闻公告接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delNewsInfo = id =>{
    return request({
        url:'/common/news/delNewsInfo',
        method:'delete',
        params:{id:id}
    })
};
/**
 * 根据id集合批量删除新闻公告接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delBatchNewsInfo = id =>{
    return request({
        url:'/common/news/delBatchNewsInfo',
        method:'delete',
        params:{idList:id}
    })
};


